package ${domain}.module.wsys.req;

import org.hibernate.validator.constraints.Length;
import ${domain}.frame.base.BaseUpdateRequest;

import javax.validation.constraints.NotNull;

/**
 * DictItemUpdateRequest - 字典项更新
 *
 * @author wangbing
 * @version 0.0.1
 * @since 2017-01-01
 */
public class DictItemUpdateRequest extends BaseUpdateRequest {

    /**
     * 主键
     */
    @NotNull(message = "[id]主键不能为NULL")
    private Long id;

    /**
     * 字典枚举
     */
    @Length(min = 0, max = 10, message = "[key]字典枚举长度不合法(0-10)")
    private String key;

    /**
     * 字典描述
     */
    @Length(min = 0, max = 100, message = "[value]字典描述长度不合法(0-100)")
    private String value;

    /**
     * 排序
     */
    @NotNull(message = "[sort]字典项排序值不能为空")
    private Integer sort;

    /**
     * 是否有效
     */
    @NotNull(message = "[valid]是否有效不能为空")
    private Boolean valid;

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getKey() {
        return this.key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getValue() {
        return this.value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public Integer getSort() {
        return this.sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public Boolean getValid() {
        return this.valid;
    }

    public void setValid(Boolean valid) {
        this.valid = valid;
    }
}
